package org.mat.ipaas.ucenter.service.api.system;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mat.framework.lang.dto.MatApiResponse;

import org.mat.ipaas.ucenter.service.dto.system.entity.SysLogDTO;
import org.mat.ipaas.ucenter.service.dto.system.entity.SysRoleDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 系统日志表 前端控制器
 * </p>
 *
 * @Author zhangweijian
 * @since 2018-12-26
 */
@FeignClient(name = "mat-ipaas-ucenter-service",contextId = "sys-log-rest-api")
public interface SysLogRestAPI {

	/**
	 * @功能：查询日志记录
	 * @param sysLogDTO
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	@RequestMapping(value = "/sys/log/list", method = RequestMethod.GET)
    MatApiResponse<Page<SysLogDTO>> queryPageList(@SpringQueryMap SysLogDTO sysLogDTO,
												  @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
												  @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);

	/**
	 * @功能：删除单个日志记录
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/sys/log/delete", method = RequestMethod.DELETE)
    MatApiResponse<SysLogDTO> delete(@RequestParam(name = "id", required = true) String id);

	/**
	 * @功能：批量，全部清空日志记录
	 * @param ids
	 * @return
	 */
	@RequestMapping(value = "/sys/log/deleteBatch", method = RequestMethod.DELETE)
    MatApiResponse<SysRoleDTO> deleteBatch(@RequestParam(name = "ids", required = true) String ids);


}
